// pages/details/details.ts
Page({

  /**
   * 页面的初始数据
   */
  data: {
    username: '1',
    userimg: '1',
    imgIndex: 0,
    imgList: [
      'https://dimg04.c-ctrip.com/images/1me6k12000emlg9bi027D_W_800_0_Q90.jpg',
      'https://dimg04.c-ctrip.com/images/1me3m12000eml7gxz60C9_W_800_0_Q90.jpg',
      'https://dimg04.c-ctrip.com/images/1me4k12000eml9i1mEFAD_W_800_0_Q90.jpg',
      'https://dimg04.c-ctrip.com/images/1me6212000emldvv8715E_W_800_0_Q90.jpg',
      'https://dimg04.c-ctrip.com/images/1me6212000emldvv8715E_W_800_0_Q90.jpg',
      'https://dimg04.c-ctrip.com/images/1me6212000emldvv8715E_W_800_0_Q90.jpg',
      'https://dimg04.c-ctrip.com/images/1me5t12000eml9qts8937_W_800_0_Q90.jpg',
      'https://dimg04.c-ctrip.com/images/1me5b12000emlc9ni7F1B_W_800_0_Q90.jpg',
      'https://dimg04.c-ctrip.com/images/1me7312000eml293d2F96_W_800_0_Q90.jpg'
    ]
  },
  swiperChangeIndex(e: any) {
    this.setData({
      imgIndex: e.detail.current
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(e: any) {
    console.log(e);
    wx.setNavigationBarTitle({
      title: '携程社区'
    });
    this.setData({
      username: e.username,
      userimg: e.userimg
    });
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})